using System;
using System.Windows.Forms;
using WindowsLive.Writer.Api;

namespace SubtextSmiliesPlugin
{
    [WriterPlugin("805EEA63-B54B-4e6d-A290-F5E9E8229FC3", "DasBlog Smilies",
    ImagePath = "Images.SSmilies.png",
		 PublisherUrl = "http://www.analystdeveloper.com",
		 Description = "Adds smilies from DasBlog installation")]

	[InsertableContentSource( "DasBlog Smilies" )]
	public class SimpleSubtextSmiliesPlugin : ContentSource
	{
		public SimpleSubtextSmiliesPlugin()
		{
		}

		public override DialogResult CreateContent(IWin32Window dialogOwner, ref string newContent)
		{
			using (SubtextSmiliesInsertForm insertForm = new SubtextSmiliesInsertForm())
			{
				//insertForm.Message = "Hello World!";
			    
			    
				DialogResult result = insertForm.ShowDialog();
				if(result == DialogResult.OK)
				{
					string message = insertForm.Message;
					newContent = String.Format("{0}", message);
				}
				return result;
			}
		}
	    
	}
}
